package org.example.java_200_question.p01;

import java.util.concurrent.*;

/**
 * @author lou ke
 * @since 2024/2/8 20:31
 * <p>
 * 通过线程池创建线程
 */
public class MyExecutor implements Runnable {

    public static void main(String[] args) {
        ExecutorService executorService = Executors.newFixedThreadPool(10);
        executorService.execute(new MyExecutor());

        ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(10, 10, 0L, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<>(100));

    }

    @Override
    public void run() {
        System.out.println("hello world");
    }
}
